package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func openNameMei() []string {
	filePtr, err := os.Open("./名字")
	if err != nil {
		fmt.Println("文件打开失败 [Err:%s]", err.Error())
	}
	defer filePtr.Close()

	var lines []string
	reader := bufio.NewReader(filePtr)
	for {
		line, err := reader.ReadString('\n')
		if err == io.EOF {
			lines = append(lines, line)
			break
		}
		if err != nil {
			return lines
		}
		lines = append(lines, line[:len(line)-2])
	}
	return lines
}
